import request from '@/router/axios';

/* 调拨、回拨 记录 page */
export const getList = (current, size, trType, trKind, params) => {
  return request({
    url: '/api/rb-oem/oem/transfer/store_transfer/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
      trType,
      trKind
    }
  })
}

/* 调拨、回拨 记录子集 page */
export const getListSn = (current, size, params) => {
  return request({
    url: '/api/rb-oem/oem/transfer/store_transfer/listSn',
    method: 'get',
    params: {
      ...params,
      current,
      size
    }
  })
}

/* 调拨、回拨 确认 */
export const confirmTransfer = (rsrNo) => {
  return request({
    url: '/api/rb-oem/oem/transfer/store_transfer/confirmTransfer',
    method: 'post',
    params: {
      rsrNo
    }
  })
}

/* 调拨 未签收状态 撤销 */
export const cancelTransfer = (rsrNo) => {
  return request({
    url: '/api/rb-oem/oem/store/store/cancelTransfer',
    method: 'post',
    params: {
      rsrNo
    }
  })
}

/* 调拨、回拨记录 导出 */
export const getExport = (params) => {
  return request({
    headers: {
      "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
    },
    responseType: 'blob',
    url: '/api/rb-oem/oem/transfer/store_transfer/export',
    method: 'get',
    params: {
      ...params,
    }
  })
}

/* 调拨、回拨记录 导出模板 */
export const getExportTemplate = (params) => {
  return request({
    headers: {
      "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
    },
    responseType: 'blob',
    url: '/api/rb-oem/oem/store/store/export-template-tr',
    method: 'get',
    params: {
      ...params,
    }
  })
}

/* 回拨记录 导出模板 */
export const getExportTemplateNo = (params) => {
  return request({
    headers: {
      "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
    },
    responseType: 'blob',
    url: '/api/rb-oem/oem/store/store/export-template-tr-no',
    method: 'get',
    params: {
      ...params,
    }
  })
}